$(function () {
    var container1 = new Swiper(".container1", {
        loop: true,
        autoplay:
        {
            delay: 2000,
             pauseOnMouseEnter: true,
        },
        effect: "fade",
        navigation: {
            nextEl: '.swiper-button-next',
            prevEl: '.swiper-button-prev',
        },
        pagination: {
            el: ".swiper-pagination",
            clickable: true,
            // bulletActiveClass: 'active',
            // bulletActiveClass: 'my-bullet-active',
            dynamicBullets: true,
        },
    });
    // 改变分页器除非页面改变的事件; 
    var bullets = container1.pagination.bullets;

    for (var i = 0; i < bullets.length; i++) {
        bullets[i].onclick = function () {
            this.click();
        }

    }
    container1.el.onmouseover = function () {
        container1.autoplay.stop();
    }
    container1.el.onmouseout = function () {
        container1.autoplay.start();
    }
    $(".swiper-button-next").on("mouseover",function(){
        this.style.backgroundColor="#B81770"
    })
    $(".swiper-button-next").on("mouseout",function(){
        this.style.backgroundColor="rgba(0,0,0,.5)"
    })
    $(".swiper-button-prev").on("mouseover",function(){
        this.style.backgroundColor="#B81770"
    })
    $(".swiper-button-prev").on("mouseout",function(){
        this.style.backgroundColor="rgba(0,0,0,.5)"
    })
})